home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tcxl551.arc / TCXL_INC.EXE / lha / INC / TCXLHDW.H < prev    next >
Text File  |  1990-10-01  |  6KB  |  101 lines

  1. /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
  2.  | Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
  3.  |
  4.  | This Library is part of IDC's TesSeRact Development Tools product
  5.  | line. For information about other IDC products, call 1-215-884-3373.
  6.  *----------------------------------------------------------------------*
  7.  | <TCXLhdw.h> : Definitions and prototypes for TCXL hardware functions
  8.  *----------------------------------------------------------------------*
  9.  | PGS : $Id: tcxlhdw.h 5.51 90/10/01 00:00:00 MLM Release Locker: MLM $
  10.  | $Log:    tcxlhdw.h $
  11.  | Revision 5.51  90/10/01  00:00:00  MLM
  12.  | TCXL 5.51
  13.  | 
  14.  *======================================================================*/
  15. #ifndef  _TCXLhdw_
  16. #  define   _TCXLhdw_ 1    /* only once! */
  17. #  ifndef   _TCXLdef_
  18. #     include  <TCXLdef.h>
  19. #  endif
  20.                               /*- Machine ID's returned by Machid() ----*/
  21. #define  IBMPC       0xFF     /* IBM PC                                 */
  22. #define  IBMPCXT     0xFE     /* IBM PC/XT, Portable, old Compaq DeskPro*/
  23. #define  IBMPCJR     0xFD     /* IBM PCjr                               */
  24. #define  IBMPCAT     0xFC     /* IBM PC/AT, XT/286, PS/2 Model 50,60    */
  25. #define  IBMPCXT2    0xFB     /* IBM PC/XT                              */
  26. #define  IBMPS30     0xFA     /* IBM PS/2 model 30                      */
  27. #define  IBMCONV     0xF9     /* IBM PC Convertible                     */
  28. #define  IBMPS80     0xF8     /* IBM PS/2 model 80                      */
  29. #define  SPERRYPC    0x30     /* Sperry PC                              */
  30. #define  CPQPORT     0x2D     /* old Compaq portable                    */
  31. #define  CPQPLUS     0x9A     /* old Compaq plus                        */
  32. #define  HP110       0xB6     /* HP-110 portable                        */
  33.  
  34.                               /*- Hardware option flag bits ---*/
  35. #define  HDW_GAM     0x01     /* game-adapter                  */
  36. #define  HDW_NDP     0x02     /* math-coprocessor              */
  37. #define  HDW_MOU     0x04     /* PS/2 mouse                    */
  38. #define  HDW_MDM     0x08     /* PS/2 modem                    */
  39. #define  HDW_C40     0x10     /* 40-col color                  */
  40. #define  HDW_C80     0x20     /* 80-col color                  */
  41. #define  HDW_M80     0x40     /* 80-col mono                   */
  42.  
  43. /*------------------[ Data objects and access macros ]------------------*/
  44.  
  45. TYP   struct   Hdw   HdwT, *HdwP;
  46. struct   Hdw                  /*-[ Hardware-data object ]---*/
  47. {  BytT     hpar;             /* 00|00 : parallel-ports     */
  48.    BytT     hser;             /* 01|01 : serial-ports       */
  49.    BytT     hdrv;             /* 02|02 : floppy-drives      */
  50.    BytT     hflg;             /* 03|03 : option flags       */
  51. };                            /* 04|04 ]--------------------*/
  52.  
  53. GBL   HdwT  CDC   _HdwCtl;    /*- Global Hardware-data object ----------*/
  54.                               /* access macros after prototypes         */
  55.  
  56. /*------------------------[ Function prototypes ]-----------------------*/
  57.  
  58. #ifdef __cplusplus            /* no mangling, please */
  59.    extern   "C"   {
  60. #endif
  61. ChrP  CTYP  BiosVer(NOARG);            /* Get BIOS version (maybe)      */
  62. IntT  CTYP  ClockCal(NOARG);           /* Detect XT clock/cal           */
  63. IntT        gameport(NOARG);           /* Detect gameport               */
  64. IntT        HdwC40(NOARG);             /* TRUE if 40-col color video    */
  65. IntT        HdwC80(NOARG);             /* TRUE if 80-col color video    */
  66. IntT        HdwDrv(NOARG);             /* Get floppy-drive count        */
  67. IntT        HdwFlg(NOARG);             /* Get hardware option flags     */
  68. IntT        HdwGam(NOARG);             /* TRUE if game-adapter present  */
  69. IntT        HdwM80(NOARG);             /* TRUE if 80-col mono video     */
  70. IntT        HdwMdm(NOARG);             /* TRUE if PS/2 modem present    */
  71. IntT        HdwMou(NOARG);             /* TRUE if PS/2 mouse present    */
  72. IntT        HdwNdp(NOARG);             /* TRUE if coprocessor present   */
  73. IntT        HdwPar(NOARG);             /* Get parallel port count       */
  74. IntT        HdwSer(NOARG);             /* Get serial port count         */
  75. IntT  CTYP  MachId(NOARG);             /* Get machine-id (maybe)        */
  76. IntT        mathchip(NOARG);           /* Detect NDP                    */
  77. IntT        numflop(NOARG);            /* Get floppy-drive count        */
  78. IntT        numpar(NOARG);             /* Get parallel-port count       */
  79. IntT        numser(NOARG);             /* Get serial-port count         */
  80. VOID  PAS   _BioEqp(NOARG);            /* Get BIOS equip flags          */
  81. #define  HdwPar() (_HdwCtl.hpar)                /* parallel ports       */
  82. #define  HdwSer() (_HdwCtl.hser)                /* serial ports         */
  83. #define  HdwDrv() (_HdwCtl.hdrv)                /* floppy-drives        */
  84. #define  HdwFlg() (_HdwCtl.hflg)                /* option flags         */
  85. #define  HdwGam() (0 != (HdwFlg() & HDW_GAM))   /*    game-adapter      */
  86. #define  HdwNdp() (0 != (HdwFlg() & HDW_NDP))   /*    math-coprocessor  */
  87. #define  HdwMou() (0 != (HdwFlg() & HDW_MOU))   /*    PS/2 mouse        */
  88. #define  HdwMdm() (0 != (HdwFlg() & HDW_MDM))   /*    PS/2 modem        */
  89. #define  HdwC40() (0 != (HdwFlg() & HDW_C40))   /*    40-col color      */
  90. #define  HdwC80() (0 != (HdwFlg() & HDW_C80))   /*    80-col color      */
  91. #define  HdwM80() (0 != (HdwFlg() & HDW_M80))   /*    80-col mono       */
  92. #define  gameport()  HdwGam() /*- obsolescent CXL functions ------------*/
  93. #define  mathchip()  HdwNdp()
  94. #define  numflop()   HdwDrv()
  95. #define  numpar()    HdwPar()
  96. #define  numser()    HdwSer()
  97. #ifdef __cplusplus
  98.    }
  99. #endif
  100. #endif   /* _TCXLhdw_  -- End of TCXLhdw.h */
  101.